package com.wjv.example.springboot.dubbo.controller;

import com.wjv.example.springboot.dubbo.service.UserService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>Title: UserController</p>
 *
 * @author wjv
 * @date 2021/4/8 13:43
 * @description
 */
@RestController
public class UserController {
    @DubboReference(
            version = "1.0.0",
            group = "dev",
            interfaceClass = UserService.class
    )
    private UserService userService;

    @GetMapping(path = "/user/hello")
    public String hello() {
        return userService.getUserName();
    }
}
